Skip to content

Split button: «IDE-Link kopieren ▾» in front, «In IDE öffnen» in the menu - #20

Merged
cedricvogel-leo merged 1 commit into
mainfrom
feature/copy-link-first
Oct 25, 2026
Merged

cedricvogel-leo merged 1 commit into
mainfrom
feature/copy-link-first

Conversation

@cedricvogel-leo

Copy link
Copy Markdown
Collaborator

Swaps the two actions of the P17 split button, as decided: copying the link is the learners' hand-in, so it is the visible action.

  • Main button: «IDE-Link kopieren» (en: "Copy IDE link"). It copies the link and shows «Link kopiert ✓», or, without a clipboard, the link in a field, focused and selected. New tooltip: «Kopiert einen Link zu einer Kopie dieses Codes in der IDE, z. B. für die Abgabe.» (en: "Copies a link to a copy of this code in the IDE, e.g. to hand it in.")
  • ▾ menu: «In IDE öffnen» opens the same link in a new tab, keeping its tooltip «Öffnet eine Kopie in der IDE – Änderungen dort wirken nicht hierher zurück.»
  • Both still act directly in the tap's handler (writeText, window.open), as iPad Safari requires. The classes are unchanged (glp-button--ide, glp-button--ide-menu), and so is features=ide.
  • README: the button row and the paragraph for course authors.

Tested in the hosted LiaScript player (this macro served locally):

  • The main button shows «IDE-Link kopieren» with the new tooltip. A click shows «Link kopiert ✓», and the copied link, opened in a fresh browser profile at https://glpython-edu.github.io/, runs and prints Quadrat: 49.
  • ▾ → «In IDE öffnen» (with its tooltip) opens a new tab at https://glpython-edu.github.io/.
  • With a clipboard that refuses, the field is shown, focused and fully selected.

node scripts/check-macro.mjs passes.

🤖 Generated with Claude Code

Copying the link is the learners' hand-in, so it is the split button's
visible action (tooltip: what the link is for); opening the copy in a new
tab moves into the ▾ menu, keeping its tooltip that changes there don't
come back. Both still act right in the tap's handler, as iPad Safari needs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cedricvogel-leo
cedricvogel-leo merged commit c959c05 into main Oct 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant